<?php


namespace app\admin\model\view;

use app\logic\model\view\OpusCommentUserView as OpusCommentUser;
class OpusCommentUserView extends OpusCommentUser
{
    function getList($request,$limit){
        $list=$this->where(function($q) use ($request){
            if(check_request($request,"opus_id")){
                $q->where("opus_id",$request['opus_id']);
            }
        })->where("status",1)->paginate($limit);
        if(!$list->isEmpty()){
            return $list->toArray();
        }
        return $list;
    }
}